package com.origin.file.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.origin.file.entity.domain.UserFile;
import com.origin.file.entity.vo.file.FileVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author origin
 */
@Repository
public interface UserFileMapper extends BaseMapper<UserFile> {

    List<UserFile> selectUserFileByLikeRightFilePath(@Param("filePath") String filePath, @Param("userId") String userId);

    IPage<FileVO> getFilePage(Page<FileVO> page, @Param("userFile") UserFile userFile, @Param("fileTypeId") Integer fileTypeId);

    Long selectStorageSizeByUserId(@Param("userId") String userId);

}
